package com.sikaryofficial.backend.domain.mapping;

import com.sikaryofficial.backend.domain.dto.req.BrandTasteEvaluateReq;
import com.sikaryofficial.backend.domain.dto.resp.BrandTasteEvaluateDTO;
import com.sikaryofficial.backend.domain.entity.BrandTasteEvaluate;
import com.sikaryofficial.backend.domain.vo.export.BrandTasteEvaluateExportVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author Qin.Mo
 * @date 2023/9/6
 */
@Mapper
public interface BrandTasteEvaluateMapping {

    BrandTasteEvaluateMapping INSTANCE = Mappers.getMapper(BrandTasteEvaluateMapping.class);

    /**
     * 把实体对象 转为VO
     * <p>
     * mappingControl 指定某个属性是深度copy [添加如下]
     *
     * @param brandTasteEvaluate 实体对象
     * @return VO对象
     * @Mapping(target = "xxxObj", source = "xxxObj", mappingControl = DeepClone.class)
     */
    BrandTasteEvaluateDTO coverToDTO(BrandTasteEvaluate brandTasteEvaluate);

    /**
     * req对象转 entity对象
     * @param req VO对象
     * @return
     */
    BrandTasteEvaluate coverReqToEntity(BrandTasteEvaluateReq req);

    /**
     * 把实体对象 集合转为VO
     *
     * @param brandTasteEvaluates
     * @return
     */
    List<BrandTasteEvaluateDTO> coverToDTOList(List<BrandTasteEvaluate> brandTasteEvaluates);

    BrandTasteEvaluateExportVO coverToExportVO(BrandTasteEvaluateDTO req);

    List<BrandTasteEvaluateExportVO> coverToExportVOList(List<BrandTasteEvaluateDTO> brandTasteEvaluates);

}
